import VueRouter from 'vue-router'

import News from "../pages/student/News";
import Message from "../pages/student/messages/Message";
import Messages from "../pages/student/Messages";
import Student from "../pages/Student";
import Teacher from "../pages/Teacher";
export default new VueRouter({
  routes:[
    // {
    //   path:'/news',
    //   component:News
    // },{
    //   path:'/messages',
    //   component:Messages
    // },
    {
      name:"s", //可简化访问路径
      path:'/student',
      component:Student,
      children:[
        {
          path:'news',
          component:News
        },{
          path:'messages',
          component:Messages,
          children:[
            {
              path:'message',
              component:Message
            },
          ]
        },
      ]
    },{
      path:'/teacher',
      component:Teacher
    }
  ]
})
